<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<!--
BeyondAdmin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.2.0
Version: 1.0.0
Purchase: http://wrapbootstrap.com
-->

<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Head -->
<head>
<title>主页</title>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

	<meta name="description" content="Dashboard" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--Basic Styles-->
    <link href="<%=request.getContextPath()%>/commonadmin/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link id="bootstrap-rtl-link" href="" rel="stylesheet" />
    <link href="<%=request.getContextPath()%>/commonadmin/assets/css/font-awesome.min.css" rel="stylesheet" />
    <link href="<%=request.getContextPath()%>/commonadmin/assets/css/weather-icons.min.css" rel="stylesheet" />

    <!--Fonts-->
    <link href="<%=request.getContextPath()%>/commonadmin/js/font-useso.js" rel="stylesheet" type="text/css">

    <!--Beyond styles-->
    <link href="<%=request.getContextPath()%>/commonadmin/assets/css/beyond.css" rel="stylesheet"/>
    <link href="<%=request.getContextPath()%>/commonadmin/assets/css/demo.min.css" rel="stylesheet" />
    <link href="<%=request.getContextPath()%>/commonadmin/assets/css/typicons.min.css" rel="stylesheet" />
    <link href="<%=request.getContextPath()%>/commonadmin/assets/css/animate.min.css" rel="stylesheet" />
    <link id="skin-link" href="" rel="stylesheet" type="text/css" />
 <link id="beyond-link" href="assets/css/beyond.min.css" rel="stylesheet" type="text/css" />
    
<!--Skin Script: Place this script in head to load scripts for skins and rtl support-->
<script src="<%=request.getContextPath()%>/commonadmin/assets/js/skins.min.js"></script>
</head>
<!-- /Head -->
<!-- Body -->
<body>
    <!-- Loading Container -->
    <div class="loading-container">
        <div class="loading-progress">
            <div class="rotator">
                <div class="rotator">
                    <div class="rotator colored">
                        <div class="rotator">
                            <div class="rotator colored">
                                <div class="rotator colored"></div>
                                <div class="rotator"></div>
                            </div>
                            <div class="rotator colored"></div>
                        </div>
                        <div class="rotator"></div>
                    </div>
                    <div class="rotator"></div>
                </div>
                <div class="rotator"></div>
            </div>
            <div class="rotator"></div>
        </div>
    </div>
    <!--  /Loading Container -->
    <!-- Navbar -->
<%@ include file="/commonadmin/include/admin-navbar.jsp"%>
    <!-- /Navbar -->
    <!-- Main Container -->
    <div class="main-container container-fluid" >
        <!-- Page Container -->
        <div class="page-container" >
            <!-- Page Sidebar -->
            <%@ include file="/commonadmin/include/admin-pageSidebar.jsp"%>
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <i class="fa fa-home"></i>
                            <a href="#">首页</a>
                        </li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->
                <!-- Page Header -->
                <div class="page-header position-relative">
                    <!--Header Buttons-->
                    <div class="header-buttons">
                        <a class="sidebar-toggler" href="#">
                            <i class="fa fa-arrows-h"></i>
                        </a>
                        <a class="refresh" id="refresh-toggler" href="">
                            <i class="glyphicon glyphicon-refresh"></i>
                        </a>
                        <a class="fullscreen" id="fullscreen-toggler" href="#">
                            <i class="glyphicon glyphicon-fullscreen"></i>
                        </a>
                    </div>
                    <!--Header Buttons End-->
                </div>
                <!-- /Page Header -->
                <!-- Page Body -->
                <div class="page-body">
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <div class="row">
                                <%-- <!-- 待审核课程百分比 -->
                                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" id="classPercent">
                                    <div class="databox radius-bordered databox-shadowed databox-graded">
                                        <c:forEach items="${countClass}" var="data">
                                        <div class="databox-left bg-themesecondary">
                                            <div class="databox-piechart">
                                                <div data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="${data.rate}" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.1)">
                                                	<span class="white font-90">
	                                                			${data.rate}%
                                                	</span>
                                                </div>
                                            </div>
                                        </div>
                                        
                                        <div class="databox-right">
                                            <span class="databox-number themesecondary">${data.number}</span>
                                            <div class="databox-text darkgray" style="font-size:16px;">待审核课程</div>
                                            <div class="databox-stat themesecondary radius-bordered">
                                                <i class="stat-icon icon-lg fa fa-tasks"></i>
                                            </div>
                                        </div>
                                        </c:forEach>
                                        
                                    </div>
                                </div> --%>
                               <%--  <!-- 待审核作品百分比 -->
                                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" id="worksPercent">
                                    <div class="databox radius-bordered databox-shadowed databox-graded">
                                        <c:forEach items="${countWork}" var="data">
                                        <div class="databox-left bg-themethirdcolor">
                                            <div class="databox-piechart">
                                                <div data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="${data.rate}" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.2)">
                                                	<span class="white font-90">${data.rate}%</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="databox-right">
                                            <span class="databox-number themethirdcolor">${data.number}</span>
                                            <div class="databox-text darkgray" style="font-size:16px;">待审核作品</div>
                                            <div class="databox-stat themethirdcolor radius-bordered">
                                                 <i class="stat-icon icon-lg fa fa-tasks"></i>
                                            </div>
                                        </div>
                                        </c:forEach>
                                    </div>
                                </div>
                                <!-- 待审核活动百分比 -->
                                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" id="eventPercent">
                                    <div class="databox radius-bordered databox-shadowed databox-graded">
                                         <c:forEach items="${countEvent}" var="data">
                                        <div class="databox-left bg-themeprimary">
                                            <div class="databox-piechart">
                                                <div  data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="${data.rate}" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.1)">
                                                	<span class="white font-90">${data.rate}%</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="databox-right">
                                            <span class="databox-number themeprimary">${data.number}</span>
                                            <div class="databox-text darkgray" style="font-size:16px;">待审核活动</div>
                                         
                                             <div class="databox-stat themeprimary  radius-bordered">
                                                 <i class="stat-icon icon-lg fa fa-tasks"></i>
                                            </div>
                                        </div>
                                        </c:forEach>
                                    </div>
                                </div> --%>
                                <!-- 待审核教师百分比 -->
                                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" id="teaPercent">
                                    <div class="databox radius-bordered databox-shadowed databox-graded">
                                        <c:forEach items="${countTeacher}" var="data">
                                        <div class="databox-left bg-gray">
                                            <div class="databox-piechart">
                                                <div  data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="${data.rate}" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.1)">
                                                <span class="white font-90">${data.num}人</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="databox-right">
                                           
                                            <div class="databox-text darkgray" style="font-size:16px;">平台老师数</div>
                                             <span class="databox-number gray themeprimary">${data.num}</span>
                                            <div class="databox-stat gray radius-bordered">
                                                 <i class="stat-icon icon-lg fa fa-tasks"></i>
                                            </div>
                                        </div>
                                        </c:forEach>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="row">
                    <%--     <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
                            <div class="orders-container">
                                <div class="orders-header">
                                    <h6>待审核课程</h6>
                                </div>
                                <c:if test="${empty classes}">
									<ul class="orders-list ">
										<li class="order-item  top2">
											暂时没有用户提交课程申请
										</li>
									</ul>
                                </c:if>
                                <ul class="orders-list">
                                 <c:forEach items="${classes}" var="data">
                                    <li class="class order-item top" onclick="classClick(this)">
                                   		<input type="hidden" value="${data.class_id}" name="c_id">
	                                        <div class="row ">
	                                            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8 item-left ">
	                                                <div class="item-booker">${data.class_title}(${data.realname})</div>
	                                                <div class="item-time">
	                                                    <i class="fa fa-calendar"></i>
	                                                    <span>${data.class_cdate}</span>
	                                                </div>
	                                            </div>
	                                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 item-right ">
	                                                <div class="item-price">
	                                                    <span class="currency">&#165;</span>
	                                                    <span class="price">${data.class_price}</span>
	                                                </div>
	                                            </div>
	                                        </div>
	                                        <a class="item-more" target="_blank" href="<%=request.getContextPath()%>/admin/auditing/classStatusReviseIndex.htm?class_id=${data.class_id}">
	                                            <i></i>
	                                        </a>
                                        
                                    </li>
                                    </c:forEach>
                                    
                                </ul>
                            </div>
                        </div> --%>
                        
                        
                      <%--   <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
                            <div class="orders-container">
                                <div class="orders-header">
                                    <h6>待审核作品</h6>
                                </div>
                                <c:if test="${empty works}">
									<ul class="orders-list ">
										<li class="order-item  top2">
											暂时没有用户提交作品申请
										</li>
									</ul>
                                </c:if>
                                <ul class="orders-list ">
                                 <c:forEach items="${works}" var="data">
                                    <li class="works order-item top1" onclick="worksClcik(this)">
                                   		<input type="hidden" value="${data.works_id}" name="w_id">
	                                        <div class="row">
	                                            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8 item-left">
	                                                <div class="item-booker">${data.works_name}(${data.realname})</div>
	                                                <div class="item-time">
	                                                    <i class="fa fa-calendar"></i>
	                                                    <span>${data.works_create_date}</span>
	                                                </div>
	                                            </div>
	                                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 item-right">
	                                                <div class="item-price">
	                                                    <span class="currency">&#165;</span>
	                                                    <span class="price">${data.works_sale_amount}</span>
	                                                </div>
	                                            </div>
	                                        </div>
	                                        <a class="item-more" target="_blank" href="<%=request.getContextPath()%>/admin/auditing/worksStatusReviseIndex.htm?works_id=${data.works_id}">
	                                            <i></i>
	                                        </a>
                                        
                                    </li>
                                    </c:forEach>
                                    
                                </ul>
                            </div>
                        </div>
                        
                        
                         
                        <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
                            <div class="orders-container">
                                <div class="orders-header">
                                    <h6>待审核活动</h6>
                                </div>
                                <c:if test="${empty events}">
									<ul class="orders-list ">
										<li class="order-item  top2">
											暂时没有用户提交活动申请
										</li>
									</ul>
                                </c:if>
                                <ul class="orders-list ">
                                 <c:forEach items="${events}" var="data">
                                    <li class="event order-item " onclick="eventClick(this)">
                                   		<input type="hidden" value="${data.event_id}" name="e_id">
	                                        <div class="row">
	                                            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8 item-left">
	                                                <div class="item-booker">${data.event_name}(${data.realname})</div>
	                                                <div class="item-time">
	                                                    <i class="fa fa-calendar"></i>
	                                                    <span>${data.event_create_date}</span>
	                                                </div>
	                                            </div>
	                                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 item-right">
	                                                <div class="item-price">
	                                                    <span class="currency">&#165;</span>
	                                                    <span class="price">${data.event_sale_amount}</span>
	                                                </div>
	                                            </div>
	                                        </div>
	                                        <a class="item-more" target="_blank" href="<%=request.getContextPath()%>/admin/auditing/eventStatusReviseIndex.htm?event_id=${data.event_id}">
	                                            <i></i>
	                                        </a>
                                        
                                    </li>
                                    </c:forEach>
                                    
                                </ul>
                            </div>
                        </div> --%>
                        
                         <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
                            <div class="orders-container">
                                <div class="orders-header">
                                    <h6>平台老师</h6>
                                </div>
                                <c:if test="${empty teachers}">
									<ul class="orders-list ">
										<li class="order-item  top2">
											平台中暂没有老师
										</li>
									</ul>
                                </c:if>
                                <ul class="orders-list ">
                                 <c:forEach items="${teachers}" var="data">
                                    <li class="user order-item  top2" onclick="userClick(this)">
	                                 	<input type="hidden" value="${data.user_id}" name="u_id">
	                                        <div class="row">
	                                            <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8 item-left">
	                                                <div class="item-booker">${data.username}&nbsp;&nbsp;
	                                             <%--    <c:if
															test="${data.user_sex.toString()==0}">男</c:if><c:if
															test="${data.user_sex.toString()==1}">女</c:if>
															<c:if
															test="${data.user_sex.toString()==3}">未设定</c:if> --%>
	                                                </div>
	                                                <div class="item-time">
	                                                    <i class="fa fa-calendar"></i>
	                                                    <span>${data.create_time}</span>
	                                                </div>
	                                            </div>
	                                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 item-right">
	                                                <div class="item-price">
	                                                   
	                                                </div>
	                                            </div>
	                                        </div>
	                                        <a class="item-more" href="<%=request.getContextPath()%>/admin/user/toTeaRevise.htm?user_id=${data.user_id}" >
	                                        </a>
                                    </li>
                                    
                                    </c:forEach>
                                    
                                </ul>
                            </div>
                        </div>
                        
                        
                    </div>

                    

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
        </div>
        <!-- /Page Container -->
        <!-- Main Container -->

    </div>

    <!--Basic Scripts-->
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/jquery-2.0.3.min.js"></script>
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/bootstrap.min.js"></script>
    <script src="<%=request.getContextPath()%>/commonadmin/component/jquery/jquery.cookie.js"></script>
	<script src="<%=request.getContextPath()%>/commonadmin/js/adminCookie.js"></script>
    <!--Beyond Scripts-->
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/beyond.min.js"></script>
    
	
	<!--Easy Pie Charts Needed Scripts-->
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/charts/easypiechart/jquery.easypiechart.js"></script>
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/charts/easypiechart/easypiechart-init.js"></script>

    <!--Flot Charts Needed Scripts-->
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/charts/flot/jquery.flot.js"></script>
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/charts/flot/jquery.flot.resize.js"></script>
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/charts/flot/jquery.flot.pie.js"></script>
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/charts/flot/jquery.flot.tooltip.js"></script>
    <script src="<%=request.getContextPath()%>/commonadmin/assets/js/charts/flot/jquery.flot.orderBars.js"></script>
	<script type="text/javascript">
		$(function(){
			$('.event').mouseover(function(){
				$('.event').css("cursor","pointer");
			});
			$('.user').mouseover(function(){
				$('.user').css("cursor","pointer");
			});
			$('.class').mouseover(function(){
				$('.class').css("cursor","pointer");
			});
			$('.works').mouseover(function(){
				$('.works').css("cursor","pointer");
			});
			$('#teaPercent').mouseover(function(){
				$('#teaPercent').css("cursor","pointer");
			});
			$('#worksPercent').mouseover(function(){
				$('#worksPercent').css("cursor","pointer");
			});
			$('#eventPercent').mouseover(function(){
				$('#eventPercent').css("cursor","pointer");
			});
			$('#classPercent').mouseover(function(){
				$('#classPercent').css("cursor","pointer");
			});
		});
		
		function userClick(o){
			var id = $(o).children("input").val();
			location.href="<%=request.getContextPath()%>/admin/user/toTeaRevise.htm?user_id="+id;
		}
		function eventClick(o){
			var id = $(o).children("input").val();
			location.href="<%=request.getContextPath()%>/admin/auditing/eventStatusReviseIndex.htm?event_id="+id;
		}
		function worksClcik(o){
			var id = $(o).children("input").val();
			location.href="<%=request.getContextPath()%>/admin/auditing/worksStatusReviseIndex.htm?works_id="+id;
		}
		function classClick(o){
			var id = $(o).children("input").val();
			location.href="<%=request.getContextPath()%>/admin/auditing/classStatusReviseIndex.htm?class_id="+id;
		}
		$('#classPercent').click(function(){
			location.href="<%=request.getContextPath()%>/admin/auditing/toClassStatusAuditing.htm";
		});
		$('#worksPercent').click(function(){
			location.href="<%=request.getContextPath()%>/admin/auditing/toClassStatusAuditing.htm";
		});
		$('#eventPercent').click(function(){
			location.href="<%=request.getContextPath()%>/admin/auditing/toClassStatusAuditing.htm";
		});
		$('#teaPercent').click(function(){
			location.href="<%=request.getContextPath()%>/admin/user/toTeachers.htm";
		});
	</script>
    <script>
        // If you want to draw your charts with Theme colors you must run initiating charts after that current skin is loaded
        $(window).bind("load", function () {





            //-------------------------Initiates Easy Pie Chart instances in page--------------------//
            InitiateEasyPieChart.init();

        });

    </script>
 
</body>
<!--  /Body -->
</html>
